//
//  YanComposeTypeButton.swift
//  SinaWeibo
//
//  Created by mac on 2017/6/15.
//  Copyright © 2017年 mac. All rights reserved.
//

import UIKit

class YanComposeTypeButton: UIControl {

    @IBOutlet weak var imageView: UIImageView!

    @IBOutlet weak var titleLabel: UILabel!
    
    /// 点击按钮要展示的控制器的类型
    var clsName : String?
    
    
    class func composeTypeButton(imageName: String, title: String) -> YanComposeTypeButton {
        let nib = UINib(nibName: "YanComposeTypeButton", bundle: nil)
        
        let btn = nib.instantiate(withOwner: nil, options: nil)[0] as! YanComposeTypeButton
        
        btn.imageView.image = UIImage(named: imageName)
        btn.titleLabel.text = title
        
        return btn
    }

}
